package com.yima.baseproj.module.sys.menu.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.yima.baseproj.config.validate.constraint.dict.ValidDictEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @Author 一码
 * @DATE 2021/9/20 13:27
 * @Description:
 */
@Data
public class SysMenuAddParamModel {

    @ApiModelProperty(value = "菜单名称")
    @NotBlank(message = "菜单名称不能为空")
    @Size(min = 1,max = 30,message = "菜单名称长度不正确")
    private String name;

    @ApiModelProperty(value = "上级目录")
    @NotBlank(message = "上级目录不能为空")
    private String pid;

    @ApiModelProperty(value = "菜单排序")
    @NotNull(message = "菜单排序不能为空")
    private Integer sort;

    @ApiModelProperty(value = "菜单类型")
    @ValidDictEnum(type = "menuType",message = "菜单类型值不符合规定")
    private String type;

    @ApiModelProperty(value = "菜单状态")
    @ValidDictEnum(type = "dictIsShow",message = "菜单类型值不符合规定")
    private Boolean isShow;

    @ApiModelProperty(value = "权限标识")
    private String permission;

    @ApiModelProperty(value = "路由地址")
    private String routerUrl;

    @ApiModelProperty(value = "路由参数")
    private String routerParam;

    @ApiModelProperty(value = "前端组件")
    private String component;

    @ApiModelProperty(value = "菜单图标")
    private String icon;

    @ApiModelProperty(value = "备注")
    private String remark;
}
